#pragma once
#include "ModelImportTool.h"

class DEF_MODELIMPORT CIDSDataConfigureTool:public CModelImportTool
{
public:	
	struct ConnectorData;
	struct DeviceData
	{
		CString m_sCode;
		CString m_sName;
		CString m_sSubsystem;
		CString m_sPhase;
    };

	struct ConnectorData
	{
		CString m_sCode;
		CString m_sName;
		CString m_sPinOrHole;
		DeviceData* m_pOwnerDevice;
	};

public:
	static CIDSDataConfigureTool* GetInstance();
	~CIDSDataConfigureTool(void);

	void CheckAndCreateAssoEntData(CSystem* pSystem,bool bIncreUpdate);
	
private:
	CIDSDataConfigureTool(void);
	void ClearData();
	CString GetConfigureFilePath();
	bool ReadIDSDataConfigure();

	static CIDSDataConfigureTool* m_pIDSDataConfigureTool;
	vector<DeviceData*> m_vecDevices;
	map<CString,ConnectorData*> m_mapConCodes2Conn;
};

